home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / tcpip / g0bsx / servertr.z / servertr / SERVERS / DOS.BAT < prev    next >
Encoding:
DOS Batch File  |  1990-07-27  |  3.1 KB  |  107 lines

  1. echo off
  2. rem
  3. rem The default directory where all the servers sit is the \MB directory so
  4. rem go there.
  5.  
  6. cd \MB
  7.  
  8. rem before we can use thje MAIL or BULLETIN files for mail distribution, we
  9. rem have to "doctor" them since SMTP does not like any text line longer than
  10. rem 128 characters, so we word wrap all lines to 80 characters maximum with
  11. rem the program ROUND.COM
  12.  
  13. if exist mail.txt goto domail
  14. goto nomail
  15. :domail
  16. round mail.txt mail.tmp
  17. del mail.txt
  18.  
  19. smtpi mail.tmp smtpmail.lst g0bsx.ampr.org GB7BSX
  20.  
  21. rem The parameters for the smtpi.com file are as follows:
  22. rem 1. the filename of the file into which the mailbox ahs exported all the
  23. rem    mail to be distributed. Note I use a temp file created by ROUND.COM
  24. rem 2. the filename of the list of host, callsign and selection specs desired
  25. rem    for the distribution of MAIL.
  26. rem 3. the host id of the TCP/IP system that interfaces to the mailbox.
  27. rem 4. the CALLSIGN of the mailbox.
  28. rem
  29. rem ONLY do the bulletin export in the early hours and then ONLY once per
  30. rem hour.
  31.  
  32. :nomail
  33. rem timer -ih 0106
  34. rem if errorlevel 1 goto timeok
  35. rem goto import
  36. :timeok
  37. if exist bulls.txt goto dobulls
  38. goto nobulls
  39. :dobulls
  40. round bulls.txt bulls.tmp
  41. del bulls.txt
  42.  
  43. smtpi bulls.tmp smtpbull.lst g0bsx.ampr.org GB7BSX
  44.  
  45. rem The arguments for the program smtpi.com are as follows:
  46. rem 1. The filename of the file use my the mailbox to put the exported
  47. rem    INTO. In this case it is the .TMP file created by ROUND.COM.
  48. rem 2. The filename of the list of calls and hosts and selection parameters
  49. rem    pertaining to BULLETINS.
  50. rem 3. the hostid of the SMTP TCPIP system that the mailbox is interfaced to.
  51. rem 4. the CALLSIGN of the mailbox.
  52.  
  53. :nobulls
  54. :import
  55. smtpx import.txt \mb\smtpxdel.txt GB7BSX g0bsx.ampr.org
  56.  
  57. rem The parameters of the SMTPX.COM program are the filename of the text file
  58. rem into which will be placed mailbox message for import INTO the mailbox, the
  59. rem filename containing the conditions for delivery of mail via the SMTP and
  60. rem TCPIP mailbox system, the Mailbox Callsign and the TCPIP host id.
  61. rem NOTE: the FULL pathname of the delivery condition filename MUST be given.
  62. rem
  63. rem Since SMTP don't like long lines, ROUND this output file as well just
  64. rem to be on the safe side!
  65.  
  66. if exist import.txt goto roundit
  67. goto bpqnodes
  68.  
  69. :roundit
  70. round import.txt import.tmp
  71. copy import.tmp import.txt
  72.  
  73. rem I always leave the .TMP files in case something fails so that I can have
  74. rem a look at them and perhaps re-cycle them if needs be.
  75.  
  76. :bpqnodes
  77. rem  update BPQ nodes list every 3 hours.
  78.  
  79. timer -th 3
  80. if errorlevel 1 goto datime
  81. goto doage
  82. :datime
  83. cd \bpq
  84. bpqnodes
  85.  
  86. rem If you do not run NOS mailbox and bulletin areas, commecnt out the next
  87. rem section.
  88. rem Age the bulletins in the SMTP mailbox once a day after between 0100
  89. rem and 0200
  90.  
  91. :doage
  92. cd\spool
  93. rem Change to a different directory sibnce I want to use different time data
  94. \mb\timer -ih 1717
  95. if errorlevel 1 goto smtpage
  96. goto end
  97. :smtpage
  98.  
  99. rem see documentation on AGE.COM in the file AGE.DOC.
  100. \mb\age
  101. :end
  102. cd \bbs
  103.  
  104. rem you MUST change back to the BBS directory for SERVER to work another time!
  105. rem
  106. rem *** The END *** ((phew!))
  107.